package org.example.domain.model.entity.url;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;


@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "短链接分组实体")
public class UrlShortenerGroup{

    @Schema(description = "id")
    private Long id;

    @Schema(description = "分组标识")
    private String gid;

    @Schema(description = "分组名称")
    private String groupName;

    @Schema(description = "创建分组用户名")
    private String userName;

    @Schema(description = "分组排序")
    private Integer sortOrder;

    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;


    @Schema(description = "删除标识, true:已删除, false:未删除")
    @TableField(fill = FieldFill.INSERT)
    private Boolean deleteIdentity;
}